package com.rfouchet.movie.allocineapi;

public enum TypePartner {

	UN(1), DEUX(2), TROIS(3), QUATRE(4);

	private int partner;

	private TypePartner(int partner) {
		this.partner = partner;
	}

	public int getPartner() {
		return partner;
	}

	public TypePartner fromPartner(int p) {
		for (TypePartner v : TypePartner.values()) {
			if (v.partner == p) {
				return v;
			}
		}
		return null;
	}

}
